﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class DetailFindText : MonoBehaviour
{
    NPCs[] npc;

    public Text Detail_Text;

    public Text Name;

    private void Start()
    {
        npc = GameObject.Find("GameManager").GetComponent<NPCManager>().NPC;
    }

    public void Refresh(string NPC_Name)
    {
        for(int i = 0; i < npc.Length; i++)
        {
            if(npc[i].name == NPC_Name)
            {
                Name.text = NPC_Name;
                Detail_Text.text = PlayerPrefs.GetString(NPC_Name);
            }
        }
    }
}
